class OrderInfoEntity {
  int code;
  Data data;
  String message;

  OrderInfoEntity({
      this.code, 
      this.data, 
      this.message});

  OrderInfoEntity.fromJson(dynamic json) {
    code = json["code"];
    data = json["data"] != null ? Data.fromJson(json["data"]) : null;
    message = json["message"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["code"] = code;
    if (data != null) {
      map["data"] = data.toJson();
    }
    map["message"] = message;
    return map;
  }

}

class Data {
  String profitTime;
  String payTime;
  int goodsCountTotal;
  int orgTypeID;
  String orderStatusName;
  String receiverPhone;
  String province;
  int containsRp;
  String medicineForm;
  List<Details> details;
  int medicineFormID;
  String area;
  int itemCountTotal;
  String orderSourceName;
  String keyID;
  String orgID;
  String returnTime;
  String addressID;
  int ownClinic;
  String deliveryRemarks;
  String doctorID;
  String doctorOrgID;
  int goodsPrice;
  int thirdOrderStatusID;
  String deliveryTime;
  String city;
  String deliveryMan;
  int deliveryTypeID;
  int orderStatusID;
  int payTypeID;
  int deliveryStatusID;
  String personID;
  num orderPrice;
  int orderSource;
  String address;
  String refundTime;
  String accountTransID;
  String receiverName;
  String deliveryNo;
  int deliveryPrice;
  String rpID;
  String deliveryCompany;
  int profitStatusID;
  String payTypeName;
  String personName;
  String deliveryStatusName;
  String receiveTime;
  String deliveryTypeName;
  int orderBelong;
  String createTime;
  String profitStatusName;
  String remarks;

  Data({
      this.profitTime, 
      this.payTime, 
      this.goodsCountTotal, 
      this.orgTypeID, 
      this.orderStatusName, 
      this.receiverPhone, 
      this.province, 
      this.containsRp, 
      this.medicineForm, 
      this.details, 
      this.medicineFormID, 
      this.area, 
      this.itemCountTotal, 
      this.orderSourceName, 
      this.keyID, 
      this.orgID, 
      this.returnTime, 
      this.addressID, 
      this.ownClinic, 
      this.deliveryRemarks, 
      this.doctorID, 
      this.doctorOrgID, 
      this.goodsPrice, 
      this.thirdOrderStatusID, 
      this.deliveryTime, 
      this.city, 
      this.deliveryMan, 
      this.deliveryTypeID, 
      this.orderStatusID, 
      this.payTypeID, 
      this.deliveryStatusID, 
      this.personID, 
      this.orderPrice, 
      this.orderSource, 
      this.address, 
      this.refundTime, 
      this.accountTransID, 
      this.receiverName, 
      this.deliveryNo, 
      this.deliveryPrice, 
      this.rpID, 
      this.deliveryCompany, 
      this.profitStatusID, 
      this.payTypeName, 
      this.personName, 
      this.deliveryStatusName, 
      this.receiveTime, 
      this.deliveryTypeName, 
      this.orderBelong, 
      this.createTime, 
      this.profitStatusName, 
      this.remarks});

  Data.fromJson(dynamic json) {
    profitTime = json["profitTime"];
    payTime = json["payTime"];
    goodsCountTotal = json["goodsCountTotal"];
    orgTypeID = json["orgTypeID"];
    orderStatusName = json["orderStatusName"];
    receiverPhone = json["receiverPhone"];
    province = json["province"];
    containsRp = json["containsRp"];
    medicineForm = json["medicineForm"];
    if (json["details"] != null) {
      details = [];
      json["details"].forEach((v) {
        details.add(Details.fromJson(v));
      });
    }
    medicineFormID = json["medicineFormID"];
    area = json["area"];
    itemCountTotal = json["itemCountTotal"];
    orderSourceName = json["orderSourceName"];
    keyID = json["keyID"];
    orgID = json["orgID"];
    returnTime = json["returnTime"];
    addressID = json["addressID"];
    ownClinic = json["ownClinic"];
    deliveryRemarks = json["deliveryRemarks"];
    doctorID = json["doctorID"];
    doctorOrgID = json["doctorOrgID"];
    goodsPrice = json["goodsPrice"];
    thirdOrderStatusID = json["thirdOrderStatusID"];
    deliveryTime = json["deliveryTime"];
    city = json["city"];
    deliveryMan = json["deliveryMan"];
    deliveryTypeID = json["deliveryTypeID"];
    orderStatusID = json["orderStatusID"];
    payTypeID = json["payTypeID"];
    deliveryStatusID = json["deliveryStatusID"];
    personID = json["personID"];
    orderPrice = json["orderPrice"];
    orderSource = json["orderSource"];
    address = json["address"];
    refundTime = json["refundTime"];
    accountTransID = json["accountTransID"];
    receiverName = json["receiverName"];
    deliveryNo = json["deliveryNo"];
    deliveryPrice = json["deliveryPrice"];
    rpID = json["rpID"];
    deliveryCompany = json["deliveryCompany"];
    profitStatusID = json["profitStatusID"];
    payTypeName = json["payTypeName"];
    personName = json["personName"];
    deliveryStatusName = json["deliveryStatusName"];
    receiveTime = json["receiveTime"];
    deliveryTypeName = json["deliveryTypeName"];
    orderBelong = json["orderBelong"];
    createTime = json["createTime"];
    profitStatusName = json["profitStatusName"];
    remarks = json["remarks"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["profitTime"] = profitTime;
    map["payTime"] = payTime;
    map["goodsCountTotal"] = goodsCountTotal;
    map["orgTypeID"] = orgTypeID;
    map["orderStatusName"] = orderStatusName;
    map["receiverPhone"] = receiverPhone;
    map["province"] = province;
    map["containsRp"] = containsRp;
    map["medicineForm"] = medicineForm;
    if (details != null) {
      map["details"] = details.map((v) => v.toJson()).toList();
    }
    map["medicineFormID"] = medicineFormID;
    map["area"] = area;
    map["itemCountTotal"] = itemCountTotal;
    map["orderSourceName"] = orderSourceName;
    map["keyID"] = keyID;
    map["orgID"] = orgID;
    map["returnTime"] = returnTime;
    map["addressID"] = addressID;
    map["ownClinic"] = ownClinic;
    map["deliveryRemarks"] = deliveryRemarks;
    map["doctorID"] = doctorID;
    map["doctorOrgID"] = doctorOrgID;
    map["goodsPrice"] = goodsPrice;
    map["thirdOrderStatusID"] = thirdOrderStatusID;
    map["deliveryTime"] = deliveryTime;
    map["city"] = city;
    map["deliveryMan"] = deliveryMan;
    map["deliveryTypeID"] = deliveryTypeID;
    map["orderStatusID"] = orderStatusID;
    map["payTypeID"] = payTypeID;
    map["deliveryStatusID"] = deliveryStatusID;
    map["personID"] = personID;
    map["orderPrice"] = orderPrice;
    map["orderSource"] = orderSource;
    map["address"] = address;
    map["refundTime"] = refundTime;
    map["accountTransID"] = accountTransID;
    map["receiverName"] = receiverName;
    map["deliveryNo"] = deliveryNo;
    map["deliveryPrice"] = deliveryPrice;
    map["rpID"] = rpID;
    map["deliveryCompany"] = deliveryCompany;
    map["profitStatusID"] = profitStatusID;
    map["payTypeName"] = payTypeName;
    map["personName"] = personName;
    map["deliveryStatusName"] = deliveryStatusName;
    map["receiveTime"] = receiveTime;
    map["deliveryTypeName"] = deliveryTypeName;
    map["orderBelong"] = orderBelong;
    map["createTime"] = createTime;
    map["profitStatusName"] = profitStatusName;
    map["remarks"] = remarks;
    return map;
  }

}

class Details {
  String imgUrl;
  String orderID;
  String goodsID;
  String medicineID;
  String productBrand;
  int otcType;
  String keyID;
  double priceItem;
  String productFactory;
  double priceSum;
  String productSpec;
  String medicineName;
  String thirdGoodsID;
  int itemCount;

  Details({
      this.orderID, 
      this.goodsID, 
      this.medicineID, 
      this.otcType, 
      this.keyID, 
      this.priceItem, 
      this.productFactory, 
      this.priceSum, 
      this.productSpec, 
      this.medicineName, 
      this.thirdGoodsID, 
      this.itemCount});

  Details.fromJson(dynamic json) {
    orderID = json["orderID"];
    goodsID = json["goodsID"];
    medicineID = json["medicineID"];
    otcType = json["otcType"];
    keyID = json["keyID"];
    priceItem = json["priceItem"];
    productFactory = json["productFactory"];
    priceSum = json["priceSum"];
    productSpec = json["productSpec"];
    medicineName = json["medicineName"];
    thirdGoodsID = json["thirdGoodsID"];
    itemCount = json["itemCount"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["orderID"] = orderID;
    map["goodsID"] = goodsID;
    map["medicineID"] = medicineID;
    map["otcType"] = otcType;
    map["keyID"] = keyID;
    map["priceItem"] = priceItem;
    map["productFactory"] = productFactory;
    map["productBrand"] = productBrand;
    map["priceSum"] = priceSum;
    map["productSpec"] = productSpec;
    map["medicineName"] = medicineName;
    map["thirdGoodsID"] = thirdGoodsID;
    map["itemCount"] = itemCount;
    return map;
  }

}